package com.example.myproject.database.primary.repository;

import com.example.myproject.database.primary.entity.User1Entity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * domain目录主要用于实体（Entity）与数据访问层（Repository）
 */
public interface UserRepositoryPrimary extends JpaRepository<User1Entity, Long> {

    @Query(value = "select u from User1Entity u where u.id = ?1")
    User1Entity findById(@Param("id") Long id);
}
